﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class MatColorAnim : MonoBehaviour {
    public Color color = Color.white;
    private Image image;
	// Use this for initialization
	void Start () {
        image = GetComponent<Image>();
	    image.material = Instantiate(image.material) as Material;
	}
	
	// Update is called once per frame
	void LateUpdate () {
        image.material.SetColor("_Color", color);
	}
}
